#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Author:  LJ
Email:   admin@attacker.club
Time:    2020/3/17 09:44
Description: 
"""
from  bin.pssh import  run

def Check_github():
    cmd = "find /data/backups/ -mtime -3 -type f  -print"
    str = run('10.0.1.250', "root", "xxxxx", 22, cmd)
    if "backup" in str:
        res = "[+] github备份正常! 文件名:%s" % str.split("/")[-1]
        results['successful'].append(res)
    else:
        res = "[-] github备份异常! "
        results['unsuccessful'].append(res)

# def Check_ftp




if __name__ == '__main__':
    results = {
        'unsuccessful': [],
        'successful': [],
    }

    Check_github()
    print(type(results))
    print(results['unsuccessful'])
    print(results['successful'][0])





